package com.atdel.demo02;


/**
 * @BelongsProject: java_study
 * @BelongsPackage: com.atdel.demo02
 * @Author: Del
 * @CreateTime: 2025-03-03  19:03
 * @Description: TODO
 * @Version: 1.0
 */
public class Hunter {
    private String name;

    public Hunter(String name) {
        this.name = name;
    }

    public void hunt(Animal animal) {
        System.out.println(name + " 正在打猎 " + animal.getName() + "！");
        animal.run();
    }
}
